package com.ls.task.dal.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import com.ls.fw.data.rdb.impl.mybatis.mapper.entity.Example;
import com.ls.task.dal.dao.SysTaskTriggerViewDao;
import com.ls.task.dal.model.SysTaskTriggerView;
import com.ls.task.dal.vo.SysTaskTriggerViewVo;
import com.ls.task.dal.service.SysTaskTriggerViewService;
import com.ls.fw.data.rdb.impl.dao.EntityDao;
import com.ls.fw.data.rdb.impl.service.EntityServiceAdapter;


/**
 * 
 * @author ls
 * 2016年08月18日 09时49分16秒
 */
@Service("sysTaskTriggerViewService")   
public class SysTaskTriggerViewServiceImpl extends EntityServiceAdapter<SysTaskTriggerView,SysTaskTriggerViewVo,java.lang.Long>  implements SysTaskTriggerViewService{
	
    private SysTaskTriggerViewDao sysTaskTriggerViewDao = null;
   
    @Resource
    public void setSysTaskTriggerViewDao(SysTaskTriggerViewDao sysTaskTriggerViewDao) {
		this.sysTaskTriggerViewDao = sysTaskTriggerViewDao;
    }
 
	
	@SuppressWarnings("unchecked")
	@Override
	public <D extends EntityDao<SysTaskTriggerView, SysTaskTriggerViewVo,java.lang.Long>> D getEntityDao(){
		return (D) sysTaskTriggerViewDao;
	}
	
	@Override
	public List<SysTaskTriggerView> selectByExample(Example example) {
		return this.sysTaskTriggerViewDao.getMapper().selectByExample(example);
	}


	@Override
	public SysTaskTriggerView selectOneByExample(Example example) {
		return this.sysTaskTriggerViewDao.getMapper().selectOneByExample(example);
	}

	@Override
	public SysTaskTriggerView selectOne(SysTaskTriggerView record) {
		return this.sysTaskTriggerViewDao.getMapper().selectOne(record);
	}


	@Override
	public List<SysTaskTriggerView> select(SysTaskTriggerView record) {
		return this.sysTaskTriggerViewDao.getMapper().select(record);
	}


	@Override
	public int deleteByExample(Example example) {
		example.getMainCriteria().andEqualTo(SysTaskTriggerView.Columns.canDelete.property(), true);
		return this.sysTaskTriggerViewDao.getMapper().deleteByExample(example);
	}


	@Override
	public int updateByExampleSelective(SysTaskTriggerView record,
			 Example example) {
		example.getMainCriteria().andEqualTo(SysTaskTriggerView.Columns.canUpdate.property(), true);
		return this.sysTaskTriggerViewDao.getMapper().updateByExampleSelective(record, example);
	}

	@Override
	public int count(Example example){
		return this.sysTaskTriggerViewDao.getMapper().selectCountByExample(example);
	}
}
